<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        class Dog{
            constructor(name,breed) {
                this.name = name ;
                this.breed = breed;
            }
            bark() {
                console.log(`bark bark ~ My name is ${thid.name}`);
            }
            cuddle(){
                console.log(`i love you owner`);
            }
            static info (){
                console.log(`a dog is better than a cat by 10 times `);
            }//不属于实例，属于类
            get dscription() {
                return `${this.name} is a ${this.breed} type of dog`
            }
            set nickName () {
               this.nick = value.trim()
            }
            get nickName () {
              return this.nick ;
            }
        }
        Dog.info();
        var dahuang = new Dog('Sunny','Goldren Doodle')
        console.log(dahuang.info());//error
        console.log(dahuang.dscription);
        dahuang.nickName = '大黄';
        console.log(dahuang.nickName);
        console.log(dahuang.__proto__);
    </script>
</body>
</html>